/*
 * Copyright (c) 2013-2013 XXXX XXXXXX, Inc.
 * XXXX Road, XXXX, XXXX State, XXXX Post code, XXXX Country.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of XXXX
 * XXXXXX, Inc. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with XXXX.
 * 
 * History
 * Date        Ver Author        Change Description
 * ----------- --- ------------- ----------------------------------------
 * 22 May 2013 001 Karl          Create
 */
package test.com.sms.selenium.sc.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

public class ScMakeRecommendationPageUtil extends SeleniumPageUtil {
	public final static By RECOMMEND_BUTTON_CLOSE = By.xpath("//*[@id='detailsContainer']/table[1]/tbody/tr[1]/td/input");
	public final static By RECOMMEND_BUTTON_ASSGINS = By.xpath("//td[2]/div[3][text()='Assign']");
	public final static By RECOMMEND_TD_ASSIGN_RATES = By.xpath("//*[@id='assignmentRate']/table[1]/tbody/tr/td/table/tbody/tr/td[2]");
	public final static By RECOMMEND_BUTTON_FILTER_BY_NAME = By.id("filterByNameButton");
	public final static By RECOMMEND_INPUT_FIRST_NAME = By.id("first_name");
	public final static By RECOMMEND_INPUT_LAST_NAME = By.id("last_name");
	public final static By RECOMMEND_INPUT_COMPANY_NAME = By.id("company_name");
	public final static By RECOMMEND_BUTTON_SUBMIT = By.id("btnFeNameFilter");
	
	public static void waitForFilterWindow(){
		SeleniumUtil.waitOnElements(new By[]{
				RECOMMEND_INPUT_FIRST_NAME, RECOMMEND_INPUT_LAST_NAME,
				RECOMMEND_INPUT_COMPANY_NAME, RECOMMEND_BUTTON_SUBMIT
		});
		SeleniumUtil.assertTrue(SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RECOMMEND_INPUT_FIRST_NAME)));
		SeleniumUtil.assertTrue(SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RECOMMEND_INPUT_COMPANY_NAME)));
		SeleniumUtil.assertTrue(SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RECOMMEND_BUTTON_SUBMIT)));
		SeleniumUtil.assertTrue(SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RECOMMEND_BUTTON_SUBMIT)));
	}
}
